package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.Goods;
import com.atguigu.jxc.entity.Unit;
import com.atguigu.jxc.entity.vo.GoodsTypeList;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author luojia
 * @create 2022-01-01 22:10
 */

public interface GoodsTypeDao {
    /**
     * 查询分类信息
     * @param i
     * @return
     */
    List<GoodsTypeList> queryCategories(int i);

    List<Goods> queryAllGoods(@Param("rows") Integer rows,@Param("SizeStarter") Integer SizeStarter,@Param("goodsName") String goodsName,@Param("goodsTypeId") Integer goodsTypeId);

    List<Unit> queryUnit();

    void goodsTypeVoSave(@Param("goodsTypeName") String goodsTypeName,@Param("pId") Integer pId);

    void goodsTypeVoDelete(@Param("goodsTypeId") Integer  goodsTypeId);

    void goodsUpdate(@Param("goods") Goods goods,@Param("goodsId") String goodsId);

    void goodsAdd(Goods goods);

    void goodsDelete(Integer goodsId);

    List<Goods> queryNoInventoryQuantityGoods(@Param("rows") Integer rows,@Param("startNum") Integer startNum,@Param("nameOrCode") String nameOrCode);

    List<Goods> getHasInventoryQuantity(@Param("rows") Integer rows,@Param("startNum")  Integer startNum,@Param("nameOrCode") String nameOrCode);

    void updateGoods(@Param("goodsId") Integer goodsId,@Param("inventoryQuantity") Integer inventoryQuantity,@Param("purchasingPrice") double purchasingPrice);

    void deleteStock(@Param("goodsId") Integer goodsId);
}
